using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace UltimateDefend
{
    public partial class GameFrm : Form
    {
        public GameFrm()
        {
            InitializeComponent();
        }

        private void btnBack_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void btnArcade_Click(object sender, EventArgs e)
        {
            ArcadeFrm frm = new ArcadeFrm();
            frm.ShowDialog();
        }

        private void btnSurvival_Click(object sender, EventArgs e)
        {
            SurvivalFrm frm = new SurvivalFrm();
            frm.ShowDialog();
        }

        private void GameFrm_Load(object sender, EventArgs e)
        {
            // Tinh toan vi tri tren man hinh thiet bi
            int x, y;
            // Dua button vao giua man hinh
            x = ClientRectangle.Width - btnArcade.Width;
            x = x / 2;

            // y tinh tu duoi man hinh len
            y = ClientRectangle.Height - 40 - btnBack.Height;


            // Dat lai button
            btnArcade.Left = x;
            btnSurvival.Left = x;
            btnBack.Left = x;

            btnBack.Top = y;
            btnSurvival.Top = btnBack.Top - 15 - btnSurvival.Height;
            btnArcade.Top = btnSurvival.Top - 15 - btnArcade.Height;

        }
    }
}